package com.jt.demo2.service;

import com.jt.demo2.anno.TX;
import org.springframework.stereotype.Service;

@Service //id = userServiceImpl
public class UserServiceImpl implements UserService {
    //注解标识方法
    @TX
    @Override
    public void addUser() {
        System.out.println("新增用户成功!!!");
        //int a = 1 / 0;
    }

    @TX
    @Override
    public String findName() {
        //int a = 1 / 0;
        System.out.println("学习java");
        return "春节愉快~";
    }
}
